<?php

class VerifyBlackUserPreHandler extends Fs2PreHandler
{
    /**
     * @see SzAbstractCtrlPreProcessHandler::handle
     *
     * @param array $inputs passed by reference, params inputted from $_REQUEST['*']
     * @return boolean
     * @throws 20070
     */
    public function handle(&$inputs)
    {
        if ($this->checkHandleExclude($inputs)) {
            return true;
        }

        $userId = $this->parseUserId($inputs);
        if ($userId) {
            $lockTime = GameService::get()->getLockTime($userId);
            if ($lockTime != -1 && $lockTime > GameService::get()->getSysTime()) {
                throw new SzException(20070, array($lockTime));
            }
        }
        return true;
    }
}